package com.wobaby.security;

import java.util.List;

public class PermissionEntry
{

    public PermissionEntry()
    {
    }

    public PermissionEntry(String name, String desc, String permLetter, List res)
    {
        this.name = name;
        description = desc;
        this.permLetter = permLetter;
        resources = res;
    }

    public String getOperation()
    {
        return name;
    }

    public String getPermissionLetter()
    {
        return permLetter;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String n)
    {
        name = n;
    }

    public String getDesc()
    {
        return description;
    }

    public void setDesc(String d)
    {
        description = d;
    }

    public List getDependencies()
    {
        return dependencies;
    }

    public void setDependencies(List dependencies)
    {
        this.dependencies = dependencies;
    }

    public String getLocalizedName()
    {
        String entryName = name;
        if("Delete Software Compliance".equals(entryName))
            entryName = "Delete Software Level";
        if("Manage Software Compliance".equals(entryName))
            entryName = "Manage Software Level";
        return entryName;
    }

    public String toString()
    {
        return "PermissionEntry: name=" + name + ", permLetter=" + permLetter + ", resources=" + resources + ", depends=" + dependencies;
    }

    private List dependencies;
    public String name;
    public String description;
    public String permLetter;
    public List resources;
    public String localizedName;
}